import type { Config } from "tailwindcss"
import { fontFamily } from "tailwindcss/defaultTheme"

export default {
  darkMode: ["class"],
  content: [
    './pages/**/*.{ts,tsx}',
    './components/**/*.{ts,tsx}',
    './app/**/*.{ts,tsx}',
    './src/**/*.{ts,tsx}',
    './config/**/*.{ts,tsx}',
    './lib/**/*.{ts,tsx}',
    './contexts/**/*.{ts,tsx}',
    './stores/**/*.{ts,tsx}',
    './types/**/*.{ts,tsx}',
  ],
  prefix: '',
  theme: {
    screens: {
      'xs': '576px',       // 大手机 (576px+)
      'sm': '768px',       // 平板 (768px+)
      'md': '1024px',      // 笔记本 (1024px+)
      'lg': '1200px',      // 小桌面 (1200px+)
      'xl': '1366px',      // 标准桌面 (1366px+)
      '2xl': '1600px',     // 大桌面 (1600px+)
      '3xl': '1920px',     // 超大桌面 (1920px+)
    },
    container: {
      center: true,
      padding: "2rem",
      screens: {
        '2xl': '100%',  // 移除1400px限制，让container使用全宽度
      }
    },
    extend: {
      colors: {
        border: "hsl(var(--border))",
        input: "hsl(var(--input))",
        ring: "hsl(var(--ring))",
        background: "hsl(var(--background))",
        foreground: "hsl(var(--foreground))",
        primary: {
          DEFAULT: "hsl(var(--primary))",
          foreground: "hsl(var(--primary-foreground))"
        },
        secondary: {
          DEFAULT: "hsl(var(--secondary))",
          foreground: "hsl(var(--secondary-foreground))"
        },
        destructive: {
          DEFAULT: "hsl(var(--destructive))",
          foreground: "hsl(var(--destructive-foreground))"
        },
        muted: {
          DEFAULT: "hsl(var(--muted))",
          foreground: "hsl(var(--muted-foreground))"
        },
        accent: {
          DEFAULT: "hsl(var(--accent))",
          foreground: "hsl(var(--accent-foreground))"
        },
        popover: {
          DEFAULT: "hsl(var(--popover))",
          foreground: "hsl(var(--popover-foreground))"
        },
        card: {
          DEFAULT: "hsl(var(--card))",
          foreground: "hsl(var(--card-foreground))"
        }
      },
      borderRadius: {
        lg: "var(--radius)",
        md: "calc(var(--radius) - 2px)",
        sm: "calc(var(--radius) - 4px)"
      },
      fontFamily: {
        sans: ["var(--font-sans)", ...fontFamily.sans]
      },
      keyframes: {
        "accordion-down": {
          from: {
            height: "0"
          },
          to: {
            height: "var(--radix-accordion-content-height)"
          }
        },
        "accordion-up": {
          from: {
            height: "var(--radix-accordion-content-height)"
          },
          to: {
            height: "0"
          }
        }
      },
      animation: {
        "accordion-down": "accordion-down 0.2s ease-out",
        "accordion-up": "accordion-up 0.2s ease-out"
      },
      zIndex: {
        // 基础内容层 (0-19)
        'base': '0',
        'content': '1',
        'navigation': '10',
        'sidebar': '15',
        
        // 搜索相关层 (20-39) - 搜索功能统一管理
        'search-container': '20',     // 搜索框容器基础层级
        'search-fixed': '25',         // 搜索框吸顶状态  
        'search-dropdown': '30',      // 智能联想下拉框
        
        // 浮动元素层 (40-59)
        'floating': '40',
        'tooltip': '45',
        
        // 弹窗系统层 (60-89) - Dialog必须在搜索之上
        'modal-backdrop': '60',       // Dialog遮罩
        'modal-content': '65',        // Dialog内容
        'notification': '70',
        'toast': '75',
        
        // 系统顶层 (90-99)
        'system-overlay': '90',
        'debug': '99'
      }
    }
  },
  plugins: [require("tailwindcss-animate")]
} satisfies Config
